home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / networking / terms / kermit / b / ik0mai.asm < prev    next >
Encoding:
Assembly Source File  |  1992-09-29  |  8.6 KB  |  110 lines

  1. *COPY                                                 IK0MAI            01500000
  2.          CHECKVER IK0MAI,4.2                                   @SC90072 01500500
  3.          TITLE 'Kermit-370 main code'                          @SC86268 01501000
  4. KERMIT   ENTER MAIN                                            @SC86295 01502000
  5.          STM   0,1,ORGR0     Save R0,R1                        @SC87253 01503000
  6. * Initialize STORAG section                                             01504000
  7.          LM    0,1,=A(IDEFS,LDEFS)  Init. value array          @SC90080 01506000
  8.          LA    14,DEFS       Storage to initialize             @SC90080 01506200
  9.          LR    15,1                                            @SC90080 01506400
  10.          MVCL  14,0          Set up arrays                     @SC90080 01506600
  11.          MVC   S1DATA,S1XON  Series/1 orders                   @SC86295 01507000
  12.          LA    1,S1XON                                         @SC87274 01508000
  13.          ST    1,S1XOPL      Set up prompt plist               @SC87274 01509000
  14.          MVI   TRTBL+C' ',1  Set up blank finder               @SC86295 01510000
  15.          MVI   TRMTP,C'&KCONT' Default controller type (TTY)   @SC88309 01511000
  16.          MVC   ETOA,ETOAD    Init translators                  @SC86295 01512000
  17.          MVC   ATOE,ATOED                                      @SC86295 01513000
  18.          L     1,=A(TRNTBL)  1st entry is A/E                  @SC90040 01513300
  19.          MVC   TRNALF(16),0(1)                                 @SC90040 01513600
  20.          MVC   TETOA,ETOAD                                     @SC87117 01514000
  21.          MVC   TATOE,ATOED                                     @SC87117 01515000
  22.          LA    1,CMD                                           @SC86295 01524000
  23.          ST    1,TAKBUF                                        @SC86295 01525000
  24.          SR    1,1                                             @SC86295 01526000
  25.          LA    5,4095        For page boundaries...            @SC87281 01527000
  26.          BAL   14,STPTRS     Get length of storage needed      @SC86295 01528000
  27.          LA    0,7(1,5)      Round up                          @SC87281 01529000
  28.          SRA   0,3                                             @SC86295 01530000
  29.          ST    0,FREEDW      Number of dw's to get             @SC86295 01531000
  30.        DMSFREE DWORDS=(0),ERR=KRMXITS                          @SC86295 01532000
  31.          ST    1,FREEPTR     Save start of area                @SC87286 01533000
  32.          BAL   9,KRMPG       Round up to next page             @SC87281 01534000
  33.          BAL   14,STPTRS     Set up ptrs                       @SC86295 01535000
  34.          LH    1,BUFSIZ                                        @SC86295 01536000
  35.          ST    1,TYRDPL+4    Set up read lists                 @SC86295 01537000
  36.          A     1,F3                                            @SC86295 01538000
  37.          ST    1,S1RDPL+4                                      @SC86295 01539000
  38.          L     1,LOGBUF                                        @SC86295 01540000
  39.          MVI   1(1),C':'     Set up prefix                     @SC86190 01541000
  40.          KCALL SETMSG,1,E=KRMXITF Get user's settings                   01542000
  41.          KCALL SPARSET                                         @SC86152 01543000
  42.          MVC   DATL,F0                                         @SC87012 01544000
  43.          KCALL SPAR          Set defaults for other Kermit     @SC87012 01545000
  44.          KCALL USNTRF        Call main loop                    @SC87117 01546000
  45. *                                                                       01547000
  46. KRMXITF  KCALL SETMSG,4      System-dependent clean-up         @SC86316 01548000
  47.          TM    FL1,DEBUG                                       @SC88119 01548200
  48.          BZ    KRMXITG                                         @SC88119 01548400
  49.          CLOSF LOGPTR        Close                             @SC88119 01548600
  50. KRMXITG  DS    0H                                              @SC88119 01548800
  51.          LM    0,1,FREEDW    Number of dw's, ptr to area       @SC87286 01549000
  52.        DMSFRET DWORDS=(0),LOC=(1)                              @SC86295 01550000
  53. KRMXITQQ BAL   14,LDERR      Get error code                    @SC87117 01554000
  54.          RET   MAIN                                            @SC86295 01555000
  55. *                                                                       01556000
  56. KRMXITS  WTEXT 'Unable to allocate buffers'                             01557000
  57.          B     KRMXITQQ                                                 01558000
  58. *                                                                       01559000
  59. STPTRS   ST    1,RBUF        Addr of first buffer                       01560000
  60.          A     1,F64KP               Second buffer                      01561000
  61.          ST    1,WBUF                Away from first                    01562000
  62.          A     1,F64KP                                                  01563000
  63.          ST    1,TSENT               address of sent files              01564000
  64.          A     1,=A(MAXNSENT*(LFID+5)) Length of table         @SC88342 01565000
  65.          ST    1,MSNDBUF     Buffer for extra filespecs        @SC88306 01565590
  66.          AH    1,=Y(MSNDMAX*LFSTF)                             @SC89218 01565700
  67.          ST    1,CBUF        Ptr to CP answer buffer           @SC86295 01566000
  68.          LA    1,512(,1)                                       @SC89235 01567000
  69.          ST    1,EMSGP       Ptr to saved micro error msg      @SC86295 01568000
  70.          LA    1,LEMSG(1)                                      @SC86295 01569000
  71.          ST    1,LOGBUF      Ptr to LOG buffer                 @SC86295 01570000
  72.          LA    1,2(1)        Data record overlays S/1 orders   @SC86190 01571000
  73.          LA    2,S1ORDL(1)                                     @SC87281 01572000
  74.          BAL   9,KRMPGTB     Round up if necessary             @SC87281 01573000
  75.          ST    1,S1WRPL                                        @SC86295 01574000
  76.          LA    1,S1ORDL(1)   Ptr to output data                @SC86190 01575000
  77.          ST    1,TYWRPL                                        @SC86190 01576000
  78.          AH    1,BUFSIZ      Ptr to input buffer               @SC86190 01577000
  79.          LA    2,3(1)                                          @SC87281 01578000
  80.          BAL   9,KRMPGTB     Round up if necessary             @SC87281 01579000
  81.          LR    2,1                                             @SC86190 01580000
  82.          LA    1,3(1)        Allow S/1 screen info             @SC87281 01581000
  83.          ST    2,S1RDPL                                        @SC86295 01582000
  84.          ST    1,APKT                                          @SC86190 01583000
  85.          ST    1,TYRDPL      Read plist                        @SC86295 01584000
  86.          AH    1,BUFSIZ      Ptr to output holding buffer      @SC86190 01585000
  87.          ST    1,ASPKT                                         @SC86190 01586000
  88.          ST    1,AASPKT                                        @SC86190 01587000
  89.          LA    2,7(1)        Skip over extended header         @SC86190 01588000
  90.          ST    2,ASDATA                                        @SC86190 01589000
  91.          AH    1,BUFSIZ      Ptr to input decoding buffer      @SC86190 01590000
  92.          ST    1,ARPKT                                         @SC86190 01591000
  93.          AH    1,BUFSIZ      Ptr to take table                 @SC86190 01592000
  94.          KSYSBUF ,           Other buffers                     @SC86355 01593000
  95.          BR    14            Return with R1 -> end             @SC86295 01594000
  96. *                                                                       01595000
  97. * Round up R1 to next page if (R1)-(R2) would cross boundary.  @SC87281 01596000
  98. * (R5) = page size - 1 (should be 4095), return to (R9)        @SC87281 01597000
  99. KRMPGTB  AH    2,BUFSIZ      Tentative end of buffer           @SC87281 01598000
  100. KRMPGT   BCTR  2,0           Last byte                         @SC87281 01599000
  101.          XR    2,1           Same page as first?               @SC87281 01600000
  102.          NR    2,5                                             @SC87281 01601000
  103.          BZR   9             Same page, ok                     @SC87281 01602000
  104. KRMPG    AR    1,5           Round up to next page             @SC87281 01603000
  105.          OR    1,5                                             @SC87281 01604000
  106.          XR    1,5                                             @SC87281 01605000
  107.          BR    9                                                        01606000
  108.          LOCALS ,                                              @SC86295 01607000
  109. KERMIT   EXIT                                                           01608000
  110.